﻿using System;
using System.Runtime.Serialization;

namespace DataLayer.Types
{
    [Serializable]
    public class BalanceType : BaseRecord<BalanceType>, ISerializable
    {
        public BalanceType()
        {
        }

        public override string ToString()
        {
            return m_name;
        }

        public virtual void Save()
        {
            base.Save(this);
        }

        public virtual void Delete()
        {
            base.Delete(this);
        }


        #region ISerializable Members

        public BalanceType(SerializationInfo info, StreamingContext context)
        {
            Name = info.GetString("Name");
        }

        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("Name", Name);
        }

        #endregion
    }
}
